// pages/my/my.js
Page({

    /**
     * 页面的初始数据
     */
    data: {
        // text:"这是一个页面"
        source: ''
    },
    onShow() {
        if (wx.getStorageSync('username')){
            this.setData({username: wx.getStorageSync('username'),name:wx.getStorageSync('姓名')})
        }else{
            this.setData({username:'',name:'点击登录'})
        }
    },
    logout(){
        wx.setStorageSync('username', '');
        wx.redirectTo({
            url:'../login/login'
        })
    },
    version(){
        wx.navigateTo({
            url: '../version/version'
        })
    }
})


